name: Auto Issue Closer on Merge

on:
  pull_request:
    # Will trigger on closed PRs
    types: [closed]

jobs:
  Close_Issue:

    runs-on: ubuntu-latest
    # Checks if PR is merged (subflag)
    if: ${{ github.event.pull_request.merged == true }}

    steps:
      - name: Closes issues related to a merged pull request.
        uses: ldez/gha-mjolnir@v1.0.3
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
